#include <iostream>
#include <string>
#include <string>
#include <functional>
#include <vector>
#include <unistd.h>
void print(const std::string& str,int num){
    std::cout << str << " "<< num << std::endl;
}

int main(){
    using Task = std::function<void()>;
    std::vector<Task> list;
    // auto func = std::bind(print,"hello",std::placeholders::_1);
    // int num = 10;
    // func(num);
    list.push_back(std::bind(print,"hello",10));
    list.push_back(std::bind(print,"hello_1",20));
    list.push_back(std::bind(print,"hello_2",30));
    list.push_back(std::bind(print,"hello_3",40));

    for(auto& f:list){
        f();
        sleep(1);
    }
    return 0;
}